import request from '@/utils/request'

// @Summary banner列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body sysModel.SysAuthority true "banner列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"设置成功"}"
// @Router /api/banner/list [Post]

export const getBannerList = (data) => {
  return request({
    url: '/api/banner/list',
    method: 'Post',
    data
  })
}

// @Summary 添加banner
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body sysModel.SysAuthority true "添加banner"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"设置成功"}"
// @Router /api/banner/add [Post]
export const addBanner = (data) => {
  return request({
    url: '/api/banner/add',
    method: 'Post',
    data
  })
}

// @Summar 编辑banner
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body sysModel.SysAuthority true "编辑banner"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"设置成功"}"
// @Router /api/banner/update [Post]
export const editBanner = (data) => {
  return request({
    url: '/api/banner/update',
    method: 'Post',
    data
  })
}

// @Summar 删除banner
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body sysModel.SysAuthority true "删除banner"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"设置成功"}"
// @Router /api/banner/delete [Post]/api/banner/delete/{bannerId}
export const deleteBanner = (bannerId) => {
  return request({
    url: `/api/banner/delete/${bannerId}`,
    method: 'Get'
  })
}
